# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=eapeak
pkgver=130.9550d1c
pkgrel=3
groups=('blackarch' 'blackarch-wireless' 'blackarch-recon')
pkgdesc='Analysis Suite For EAP Enabled Wireless Networks.'
arch=('any')
url='https://github.com/securestate/eapeak'
license=('GPL2' 'GPL3')
depends=('python2' 'python2-scapy' 'python2-m2crypto')
makedepends=('git' 'python2-setuptools')
source=("git+https://github.com/securestate/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python2 setup.py build
}

package() {
  cd $pkgname

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.rst
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

